package test.yzx.pproject.services;

import android.app.job.JobParameters;
import android.app.job.JobService;
import android.widget.Toast;

import test.yzx.pproject.act2.JobServiceActivity;

public class MyJobService extends JobService {


    @Override
    public boolean onStartJob(JobParameters params) {

        Toast.makeText(this, "我活了", Toast.LENGTH_SHORT).show();
        JobServiceActivity.startTaskDelay(getApplicationContext());
        jobFinished(params, false);

        // true : your service needs to process the work (on a separate thread)
        // false : there's no more work to be done for this job.
        return false;
    }


    @Override
    public boolean onStopJob(JobParameters params) {
        return false;
    }



}
